<?php if(empty($this->customer)){?>
<div class="header_wp">
	<div id="page">
    	<div id="header">
        	<div class="icon_head">
            	 <a class="button_icon_all" href=""><i class="fa fa-user"></i></a>
                 <div class="dropdown">
                 	<a class="button_icon_all" id="dLabel" role="button" data-toggle="dropdown" data-target="#" href="">
               			<i class="fa fa-user"></i>
              		</a>
                    <ul class="dropdown-menu dropdown-menu_1" role="menu" aria-labelledby="dLabel">
                    	<li>
                        	<div class="drop_box_dangky">
                           		<div class="top_form_thanhtoan mobile_thanhtoan">
                                    <ul class="top_form_thanhtoan_ul">
                                        <?php  echo $this->go_cart->get_score_cart()?>
                                         <li class="giaohang_home_top"><a href="<?php echo site_url("cart/view_cart")?>"><img src="<?php echo base_url(ASSETPATH.'images/icon_cart.png')?>"></a></li>
                                         <li class="thanhvien_home_top account_head"><a href="<?php echo site_url(MY_ACOUNT);?>"><i class="fa fa-user"></i> Tài khoản</a></li>
                                    </ul>
                                </div><!-- top_form_thanhtoan mobile_thanhtoan -->
                                <div class="top_form_thanhtoan mobile_thanhtoan dai_ly">
                               		<ul class="top_form_thanhtoan_ul">
                                    	<li> <a href="<?php echo site_url(LINK_FOR_PROCESS_AGENCY);?>"><img src="<?php echo base_url(ASSETPATH.'images/icon_daily.png')?>"> Dành cho đại lý</a> </li>
                                    </ul>
                                </div>
                                <div class="drop_box_dangky_butt_2" style="margin-top:10px;">
                                	<p>Đăng nhập</p>
                                    <form method="post" action="<?php echo site_url("dang-nhap")?>">
                                    	<div class="formdangnhap_home">
                                            <input placeholder="Username" class="form-control" name="email" type="text">
                                            <input placeholder="Password" class="form-control" name="password" autocomplete="off" type="password">
                                        </div>
                                        <div class="formdangnhap_home_sub">
                                        <div class="mobile_luu" style="text-align:left;padding-left:10px">
                                                <input name="remember" type="checkbox" value="true" > <span>Lưu lại</span>
                                        </div>
                                            <input style="padding: 6px 25px;" type="submit" value="Đăng nhập" name="submit" class="btn btn-primary">
                                             <input type="button" value="Quên mật khẩu" href="http://plusmainichi.com/quen-mat-khau" name="button" id="btn_send_password"class="btn btn-primary den">
                                        </div>
                                        <div class="formdangnhap_home_sub">
                                           
                                        </div>
                                    </form>
                                </div><!-- drop_box_dangky_butt_2 -->
                                <div class="clear"></div>
                            </div><!-- drop_box_dangky -->
                        </li>
                    </ul>
                 </div><!-- dropdown -->            
            </div><!-- icon_head --> 
            <a href="#menu"></a>
            <a class="logo_mobile" href="#">PLUS MAINICHI</a>
            <p class="mobile_slogan">Happier everyday, better everyday</p>
        </div><!-- header -->  
        <nav id="menu">
        	<ul>
              <?php foreach($this->categories[0] as $cat_menu):?>
                <li <?php echo $cat_menu->active ? 'class="current-menu-item"' : false; ?>><a href="<?php echo site_url($cat_menu->slug);?>">
                <?php echo $cat_menu->name;?></a>
                    <?php if( !empty($this->categories[$cat_menu->id]) ){ ?>
                      <ul>
                           <?php  foreach ($this->categories[$cat_menu->id] as $sub_cat_menu){?>
                           <li>
                              <a href="<?php echo site_url($cat_menu->slug.'/'.$sub_cat_menu->slug); ?>"><?php echo $sub_cat_menu->name;?></a>
                           </li>
                           <?php }?>
                      </ul>
                  <?php }?>
                </li>
           		<?php endforeach;?>
                <li <?php echo $cat_menu->active ? 'class="current-menu-item"' : false; ?>>
            		<a href="<?php echo site_url('blog');?>">Bài viết</a>
            	</li>
           	</ul>
        </nav><!-- menu -->
        <div style="clear:both;"></div>
    </div><!-- page --> 
</div><!-- header_wp -->
<?php }else{ // sau khi dang nhap ?>
<div class="header_wp">
	<div id="page">
    	<div id="header">
        	<div class="icon_head">
                <span>
                	<a style="" href="<?php echo site_url("tai-khoan")?>"> 
                    	Xin chào <?php  echo $this->customer["fullname"] ?>
                    </a>
                </span>
            </div><!-- icon_head --> 
            <a href="#menu"></a>
            <a class="logo_mobile" href="#">PLUS MAINICHI</a>
            <p class="mobile_slogan">Happier everyday, better everyday</p>
        </div><!-- header --> 
     </div><!-- page -->
	 <nav id="menu">
		<ul>
			<?php foreach($this->categories[0] as $cat_menu):?>
                <li <?php echo $cat_menu->active ? 'class="current-menu-item"' : false; ?>><a href="<?php echo site_url($cat_menu->slug);?>">
                <?php echo $cat_menu->name;?></a>
                    <?php if( !empty($this->categories[$cat_menu->id]) ){ ?>
                      <ul>
                           <?php  foreach ($this->categories[$cat_menu->id] as $sub_cat_menu){?>
                           <li>
                              <a href="<?php echo site_url($cat_menu->slug.'/'.$sub_cat_menu->slug); ?>"><?php echo $sub_cat_menu->name;?></a>
                           </li>
                           <?php }?>
                      </ul>
                  <?php }?>
                </li>
            <?php endforeach;?>
            <li <?php echo $cat_menu->active ? 'class="current-menu-item"' : false; ?>>
            	<a href="<?php echo site_url('blog');?>">Bài viết</a>
            </li>
		</ul>
     </nav><!-- menu -->
     <div style="clear:both;"></div>
</div><!-- header_wp -->
<?php }?>